package com.biz.primus.ms.geo.dao.ro;


import com.biz.primus.base.redis.annotation.Ro;
import com.biz.primus.base.redis.annotation.RoSortedSet;
import com.biz.primus.ms.geo.dao.po.District;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author shenjiahao
 * @since 2016年9月1日
 */
@Ro(key = "geo:district")
@RoSortedSet(key = "list", score = "id")
@Getter
@Setter
@NoArgsConstructor
public class DistrictRo extends AbstractAreaRo {


    private static final long serialVersionUID = 4854915503481928170L;
    /**
     * 城市id
     */

    private Integer cityId;
    /**
     * 省id
     */
    private Integer provinceId;

    public DistrictRo(District po) {
        super(po);
        this.setCityId(po.getCityId() == null ? 0 : po.getCityId());
    }
}
